<?php

namespace api\energy;

/**
 * @method \api\energy\factory\facade\Electric Electric
 * @method \api\energy\factory\facade\Water Water
 */
class Energy
{

    public function __construct($config)
    {
        Config::set($config);
    }

    /**
     * @param $funName
     * @param $arguments
     * @return \api\energy\factory\facade\
     */
    public function __call($funName, $arguments)
    {
        $className = "\\api\\energy\\factory\\facade\\" . $funName;
        return new $className();
    }
}